function music_(src){
    Player.call(this)//继承于player控制器属性
    this.src=src;
    this.type="music";//方便以后用来区分
    this.init();//当前以music_的身份去调init();
}
inheritPrototype(music_,Player);//继承于player控制器方法

music_.prototype.append_src=function(){//重写入口方法
    $("body").append('<audio id="player_dm" loop="loop" src='+this.src+'>您的浏览器不支持 audio 标签。</audio>');
    this.play_object=document.getElementById("player_dm");
}

Player.prototype.Listener=function(){
    var that=this;
    document.addEventListener("WeixinJSBridgeReady", function () {  
        that.play();
    }, false);  
    document.addEventListener('YixinJSBridgeReady', function() {  
        that.play();
    }, false);

    function musicInBrowserHandler() {
        that.play();
        document.body.removeEventListener('touchstart', musicInBrowserHandler);
    }
    document.body.addEventListener('touchstart', musicInBrowserHandler);
    setTimeout(function(){
        document.body.removeEventListener('touchstart', musicInBrowserHandler);
    },2000)
    this.play();
    
}

var BGM=new music_(bgmusic.src);
